<form name="form" class="g-form" novalidate ng-submit="stepOneNext(form.$valid)">

    <h4>技术需求的重要信息，准确的填写，将有助于技术专家更高效地了解需求</h4>

    <div class="form-group form-group-sm row" ng-class="{'has-error': clicked[0] && form.title.$invalid}">

        <label class="col-xs-offset-2 col-xs-8">
            <strong>需求名称:</strong>
            <small>请概括简要地填写技术需求名称</small>
        </label>

        <div class="col-xs-offset-2 col-xs-8">
            <input class="form-control" type="text" ng-model="formData.title"
                   name="title" title="请概括简要地填写技术需求名称"
                   maxlength="40" required placeholder="请概括简要地填写技术需求名称"/>
        </div>

        <div class="col-xs-2" ng-messages="form.title.$error" ng-show="clicked[0]">
            <span class="error-tips" ng-messages-include="my-custom-messages"></span>
        </div>

    </div>

    <div class="form-group form-group-sm row" ng-class="{'has-error': clicked[0] && formData.areas.length === 0}">

        <label class="col-xs-offset-2 col-xs-8">
            <strong>需求领域:</strong>
            <small>技术需求所属的产业领域，可多选</small>
        </label>

        <div class="col-xs-offset-2 col-xs-8">
            <label class="checkbox-inline" ng-repeat="value in demandFields.areas">
                <input type="checkbox" name="areas" value="{{value}}"
                       ng-checked="formData.areas.indexOf(value)!==-1"
                       meta-form-checkbox="formData.areas">
                {{value}}
            </label>
        </div>

        <div class="col-xs-2" ng-show="clicked[0] && formData.areas.length===0">
            <span class="error-tips" ng-show="">至少选1个</span>
        </div>

    </div>

    <div class="form-group form-group-sm row"
         ng-class="{'has-error': clicked[0] && formData.cooperationWays.length === 0}">

        <label class="col-xs-offset-2 col-xs-8">
            <strong>合作方式:</strong>
            <small>需求所属方可接受的合作方式，可多选</small>
        </label>

        <div class="col-xs-offset-2 col-xs-8">
            <label class="checkbox-inline" ng-repeat="value in demandFields.cooperationWays">
                <input type="checkbox" name="cooperationWays" value="{{value}}"
                       ng-checked="formData.cooperationWays.indexOf(value)!==-1"
                       meta-form-checkbox="formData.cooperationWays">
                {{value}}
            </label>
        </div>

        <div class="col-xs-2" ng-show="clicked[0] && formData.cooperationWays.length===0">
            <span class="error-tips" ng-show="">至少选1个</span>
        </div>

    </div>

    <div class="form-group form-group-sm row" ng-class="{'has-error': clicked[0] && form.researchType.$invalid}">

        <label class="col-xs-offset-2 col-xs-8">
            <strong>交付形式:</strong>
            <small>技术需求解决方案的交付形式</small>
        </label>

        <div class="col-xs-offset-2 col-xs-8">
            <label class="radio-inline">
                <input type="radio" name="researchType" ng-model="formData.researchType" value="产品" required> 产品
            </label>
            <label class="radio-inline">
                <input type="radio" name="researchType" ng-model="formData.researchType" value="工艺" required> 工艺
            </label>
            <label class="radio-inline">
                <input type="radio" name="researchType" ng-model="formData.researchType" value="整体方案" required>
                整体方案
            </label>
        </div>

        <div class="col-xs-2" ng-messages="form.researchType.$error" ng-show="clicked[0]">
            <span class="error-tips" ng-messages-include="my-custom-messages"></span>
        </div>

    </div>

    <div class="form-group form-group-sm row"
         ng-class="{'has-error': clicked[0] && (form.researchPeriodMin.$invalid || form.researchPeriodMax.$invalid)}">

        <label class="col-xs-offset-2 col-xs-8">
            <strong>研发周期:</strong>
            <small>为保障项目的按时完成，项目负责人可根据需求与技术方案提供方协商</small>
        </label>

        <div class="col-xs-offset-2 col-xs-8 form-inline">
            <input class="form-control" type="number" ng-model="formData.researchPeriod[0]"
                   name="researchPeriodMin"
                   placeholder="最佳时长" required min="0"/>
            <span>&nbsp;&nbsp;月&nbsp;&nbsp;-&nbsp;&nbsp;</span>
            <input class="form-control" type="number" ng-model="formData.researchPeriod[1]"
                   name="researchPeriodMax"
                   placeholder="最长时限" required min="0"
                   meta-form-max-than="formData.researchPeriod[0]"/>
            <span>&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;</span>
        </div>

        <div class="col-xs-2" ng-messages="form.researchPeriodMax.$error" ng-show="clicked[0]">
            <span class="error-tips" ng-messages-include="my-custom-messages"></span>
        </div>

    </div>

    <div class="form-group form-group-sm row"
         ng-class="{'has-error': clicked[0] && (form.researchFundingMin.$invalid || form.researchFundingMax.$invalid)}">

        <label class="col-xs-offset-2 col-xs-8">
            <strong>合作经费:</strong>
            <small>项目负责人可根据需求与技术方案提供方协商</small>
        </label>

        <div class="col-xs-offset-2 col-xs-8 form-inline">
            <input class="form-control" type="number" ng-model="formData.researchFunding[0]"
                   name="researchFundingMin"
                   placeholder="满意额度" required min="0"/>
            <span>&nbsp;&nbsp;万&nbsp;&nbsp;-&nbsp;&nbsp;</span>
            <input class="form-control" type="number" ng-model="formData.researchFunding[1]"
                   name="researchFundingMax"
                   placeholder="最高上限" required min="0" meta-form-max-than="formData.researchFunding[0]"/>
            <span>&nbsp;&nbsp;万元</span>
        </div>

        <div class="col-xs-2" ng-messages="form.researchFundingMax.$error" ng-show="clicked[0]">
            <span class="error-tips" ng-messages-include="my-custom-messages"></span>
        </div>

    </div>

    <div class="form-group form-group-sm row"
         ng-class="{'has-error': clicked[0] && form.earnestMoney.$invalid}">

        <label class="col-xs-offset-2 col-xs-8">
            <strong>诚意金:</strong>
            <small>为表示诚意，在线下对接过程中，需求方愿意为技术方提供的商务成本出资</small>
        </label>

        <div class="col-xs-offset-2 col-xs-8 form-inline">
            <input class="form-control" type="number" ng-model="formData.earnestMoney" name="earnestMoney"
                   required min="0" placeholder="请输入金额"/>
            <span>&nbsp;&nbsp;元</span>
        </div>

        <div class="col-xs-2" ng-messages="form.earnestMoney.$error" ng-show="clicked[0]">
            <span class="error-tips" ng-messages-include="my-custom-messages"></span>
        </div>

    </div>

    <div class="form-group" style="text-align: center">
        <button class="btn btn-info btn-meta-14 btn-meta-blue" type="submit">下一步</button>
    </div>
</form>
